-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[libc++][C++03] Split libc++-specific tests for the frozen headers #144093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
You can test this locally with the following command:
View the diff from darker here.
|
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesThe C++03 headers are essentially a separate implementation, so it doesn't make a ton of sense to try to test two implementations with a single set of implementation-specific tests. Most of the tests will be removed in a follow-up, since they don't run in C++03 mode. This patch adds them to make as few changes to the copy as possible. The most notable changes are that This also modifies This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. Patch is 2.92 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/144093.diff 921 Files Affected:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please also make a pass to get all of the implementation-detail tests that were removed since the headers were frozen, and re-add those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing this some more, we decided to reorganize a few parts of libcxx/test/libcxx before we actually make a copy. I have partially reviewed what needs to be split out and marked where I left it at.
libcxx/test/libcxx-03/language.support/support.types/cstddef.compile.pass.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove all of the tests that contain UNSUPPORTED: c++03
from this patch to make it easier to review.
@@ -0,0 +1,63 @@ | |||
# RUN: %{python} %s | |||
|
|||
# Verify that each run of consecutive #include directives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be split out or removed since we have a clang-tidy check for that.
Note that this also checks for #pragma system_header
even though that's not documented in the comment.
...03/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/numerics/c.math/fdelayed-template-parsing.pass.cpp
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,18 @@ | |||
//===----------------------------------------------------------------------===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't have any corresponding test for other carve outs, I'd be OK with removing this test entirely.
libcxx/test/libcxx-03/numerics/rand/rand.req.urng/valid_int_type.verify.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/numerics/rand/rand.req.urng/valid_real_type.verify.cpp
Outdated
Show resolved
Hide resolved
430667f
to
3daee65
Compare
libcxx/test/libcxx-03/containers/associative/map/scary.compile.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/containers/associative/set/scary.compile.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/containers/associative/unord.map/scary.compile.pass.cpp
Outdated
Show resolved
Hide resolved
...xx/test/libcxx-03/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/depr/depr.c.headers/math_h.compile.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp
Outdated
Show resolved
Hide resolved
fd34405
to
e657e64
Compare
libcxx/test/libcxx-03/experimental/fexperimental-library.compile.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
Outdated
Show resolved
Hide resolved
...est/libcxx-03/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/utilities/meta/stress_tests/stress_test_variant_overloads_impl.sh.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/utilities/template.bitset/includes.pass.cpp
Outdated
Show resolved
Hide resolved
libcxx/test/libcxx-03/utilities/utility/pairs/pairs.pair/pair.incomplete.compile.pass.cpp
Outdated
Show resolved
Hide resolved
6ad2ebd
to
fa20ffb
Compare
fa20ffb
to
e751f17
Compare
You can test this locally with the following command:
View the diff from clang-format here.
|
The C++03 headers are essentially a separate implementation, so it doesn't make a ton of sense to try to test two implementations with a single set of implementation-specific tests.
This patch doesn't copy over any tests that will not be run in C++03 mode. The most notable changes are that
lit.local.cfg
files are touched to change the path fromlibcxx/test/libcxx
tolibcxx/test/libcxx-03
in a few places.This also modifies
lit.local.cfg
files to runlibcxx/test/libcxx-03
only when using the frozen headers andlbcxx/test/libcxx
tests only when not using the frozen headers.This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.